package com.bestcem.xm.txtanls.dao;

import com.bestcem.xm.txtanls.entity.pojo.SurveyTxtanlsFieldDO;

import java.util.List;

/**
 * mongo TXTANLS_SURVEYTXTANLSFIELDS 相关DAO层方法
 *
 * @author XiaoYunSong <ys.xiao@idiaoyan.com>
 * @version v1.0
 * @date 2021/5/11 14:07
 */
public interface SurveyTxtanlsFieldDao {

    /**
     * 查询问卷分析项目下的全部训练字段
     *
     * @param projectId 项目id
     * @return The result of a query operation
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/12 18:07
     */
     List<SurveyTxtanlsFieldDO> findProjectAllTextFiled(String projectId) ;

    /**
     * 查询问卷字段的中文列名
     *
     * @param id 问卷字段id
     * @return Survey field zh_CN column name
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/6/22 10:57
     */
     String findFieldColName(String id) ;

    /**
     * 插入时间类型的问卷分析字段
     *
     * @param projectId 文本分析项目id
     * @param surveyId  问卷id
     * @return Time type survey analysis field created
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/14 15:41
     */
     SurveyTxtanlsFieldDO insertTimeField(String projectId, String surveyId) ;

    /**
     * 插入文本类型的问卷分析字段
     *
     * @param projectId  文本分析项目id
     * @param surveyId   问卷id
     * @param fieldId    问卷字段id
     * @param fieldTitle 问卷字段标题
     * @return Text type survey analysis field created
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/14 15:41
     */
     SurveyTxtanlsFieldDO insertTextField(String projectId, String surveyId, String fieldId, String fieldTitle);

    /**
     * 根据id删除问卷分析项目下的单个训练字段
     *
     * @param id 数据行id
     * @return The result of a delete operation
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/14 15:41
     */
    boolean deleteById(String id);
    /**
     * 删除问卷分析项目下的全部训练字段
     *
     * @param projectId 项目id
     * @return The result of a delete operation
     * @author XiaoYunSong <ys.xiao@idiaoyan.cn>
     * @date 2021/5/12 18:07
     */
    boolean deleteProjectAllFiled(String projectId) ;
}
